package com.lh;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;

@EnableDubbo(scanBasePackages = "com.lh.service.impl")
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class DubboProviderApplication {

    public static void main(String[] args) {
        SpringApplication.run(DubboProviderApplication.class);
    }

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        new PaginationInnerInterceptor();
        return new PaginationInterceptor();
    }

}
